﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace calculation.Models
{
    public class StateRepository
    {
        private UchetDataContext _datacontext;

        public StateRepository(UchetDataContext datacontext)
        {
            _datacontext = datacontext;
        }

        public IEnumerable<State> GetStates()
        {
            return _datacontext.States.OrderBy(s => s.Title );
        }
                
    }
}